﻿using System.Windows;
using System.Windows.Media;
using C1.Silverlight.Pdf;

namespace MyFloridaHouse.libSvOpenDistricts.PDF
{
    public class HouseMapLegendRowWithLineSymbol : HouseMapLegendRow
    {
        Color symbolColor;
        Color highlightColor;

        public HouseMapLegendRowWithLineSymbol(C1PdfDocument pdf, Color highlightColor, Color symbolColor, string name)
            : base(pdf, name)
        {

            this.symbolColor = symbolColor;
            this.highlightColor = highlightColor;
        }


        internal override void DrawSymbol(Rect rect)
        {
            double adjustedY = rect.Y + rect.Height / 2.0;
            double lineWidth = pdfString.fontSize / 4;
            double highlightWidth = lineWidth * 2;
            pdf.DrawLine(new Pen(highlightColor, highlightWidth), new Point(rect.X, adjustedY), new Point(rect.X + rect.Width, adjustedY));
            pdf.DrawLine(new Pen(symbolColor, lineWidth), new Point(rect.X, adjustedY), new Point(rect.X + rect.Width, adjustedY));

        }
    }
}
